<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>Face++ JavaScript SDK</title>
  </head>
  <body>
    <pre id="response">Loading...</pre>
    <script type="text/javascript" src="facepp-sdk.min.js"></script>
    <script type="text/javascript">
      (function() {
        var api = new FacePP('0ef14fa726ce34d820c5a44e57fef470', '4Y9YXOMSDvqu1Ompn9NSpNwWQFHs1hYD');
        api.request('detection/detect', {
          url: 'http://cn.faceplusplus.com/static/resources/python_demo/1.jpg'
        }, function(err, result) {
          if (err) {
            // TODO handle error
            return;
          }
          // TODO use result
          document.getElementById('response').innerHTML = JSON.stringify(result, null, 2);
        });
      })();
    </script>
  </body>
</html>
